package com.example.unittest.controller;

import com.example.unittest.service.IHomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author sjw
 * @className HomeController
 * @date 2020/12/22 17:02
 * @description: TODO
 */

@RestController
@RequestMapping("/home")
public class HomeController {

    @Autowired
    private IHomeService homeService;

    @GetMapping("/hello/{name}")
    public String hello(@PathVariable String name){
        return homeService.hello(name);
    }
}
